package cn.adelyn.blog.blogmanager.dao.mapper;

import cn.adelyn.blog.blogmanager.pojo.model.BlogPicModel;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BlogPicMapper extends BaseMapper<BlogPicModel> {

    void insertBatch(@Param("blogPicModelList") List<BlogPicModel> blogPicModelList);

    @Select("select pic_id from blog_pic ${ew.customSqlSegment}")
    List<Long> listBlogPics(@Param(Constants.WRAPPER) Wrapper wrapper);
}
